package com.gwnet.common.enums;

/**
 * @author: WangLiang
 * @date: 2024/7/20 15:12
 */
public enum SendTypeEnum {
    /**
     * 用户注册验证码
     */
    REGISTER(12, 1,"用户注册验证码", null, null),
    ;


    private Integer value;
    /**
     * 0.自定义消息 1.发送给用户，2.为发送给商家 3.发送给骑手 4.发送给运营
     */
    private Integer type;
    private String desc;
    private final String menu;
    private final String nodeName;
    public Integer getType() {
        return type;
    }
    public Integer getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }
    public String getMenu() {
        return menu;
    }

    public String getNodeName() {
        return nodeName;
    }

    SendTypeEnum(Integer value, Integer type, String desc, String menu, String nodeName) {
        this.value = value;
        this.type = type;
        this.desc = desc;
        this.menu = menu;
        this.nodeName = nodeName;
    }

    public static SendTypeEnum instance(Integer value) {
        SendTypeEnum[] enums = values();
        for (SendTypeEnum statusEnum : enums) {
            if (statusEnum.getValue().equals(value)) {
                return statusEnum;
            }
        }
        return null;
    }
}
